package BookManagement.service;

import BookManagement.dao.StockDao;
import BookManagement.domain.Stock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service("stockService")
public class StockServiceImpl implements StockService{
    @Autowired
    private StockDao stockDao;

    @Override
    public List<Stock> findStocks(HashMap<String, Object> map) {
        return stockDao.findStocks(map);
    }

    @Override
    public int getTotalStocks(HashMap<String, Object> map) {
        return stockDao.getTotalStocks(map);
    }

    @Override
    public int addStocking(Stock stock) {
        return stockDao.addStocking(stock);
    }
}
